#!/bin/sh

bioprojects=$1
orthologs=$2
orthologfile=$3

#for i in `cat $bioprojects`;do
#    for j in `cat $orthologs`;do
#        grep $j $orthologfile | grep -c $i >> $i.ortho.counts
#    done
#done

for i in `cat $orthologs`;do
    for j in `cat $bioprojects`;do
        grep $i $orthologfile | grep -c $j >> $j.ortho.counts
    done
done

paste *.counts > matrix.out


